package com.atguigu.demo;

import com.atguigu.eduservice.entity.EduSubject;
import com.atguigu.eduservice.entity.subject.OneSubject;
import com.atguigu.eduservice.mapper.EduSubjectMapper;
import com.atguigu.eduservice.service.EduSubjectService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@Service

public class testMybatis extends ServiceImpl<EduSubjectMapper, EduSubject> implements EduSubjectService {

    @Autowired
    private EduSubjectService eduSubjectService;


    @Override
    public void saveSubject(MultipartFile file, EduSubjectService eduSubjectService) {

    }


    @Override
    public List<OneSubject> getAllOneTwoSubject() {
        QueryWrapper<EduSubject> wrapper = new QueryWrapper<>();
        wrapper.ne("parent_id",0);
        List<EduSubject> list = this.list(wrapper);
        System.out.println(list);
        return null;
    }

//    @Test
//    public void testQW(){
//        List<OneSubject> allOneTwoSubject = this.getAllOneTwoSubject();
//        System.out.println(allOneTwoSubject);
//    }

}
